package day3.InnerClass;
public class Outer {
    private int outerNum = 10;
    private int num = 20;
    public class Inner{
        private int InnerNum = 30;
        private int num = 40;
        public static int a = 10;
        public static void showA(){
            System.out.println("a:"+a);
        }

        //访问外部类：
        void show(){
            System.out.println("内部类中：outerNum："+outerNum);
            System.out.println("内部类中：num："+num);//就近原则
        }

    }
    public void disp(){
        Inner inner = new Inner();
        //完整版：  Outer.Inner inner = this.new Inner();
        System.out.println("外部类中disp方法：");
        inner.show();
        inner.showA();
    }

}
